package com.example.opengldemo;

import android.content.Context;
import android.opengl.GLES20;

public class ShaderProgram {

    String U_MATRIX="u_Matrix";
    String U_TEXTURE_UNIT="u_TextureUnit";

    String A_POSITION="a_Position";
    String A_COLOR="a_Color";
    String A_TEXTURE_COORDINATES="a_TextureCoordinates";

    int program;

    public ShaderProgram(Context context,int vertexShaderResourceId,int fragmentShaderResourceId){
        program = ShaderHelper.buildProgram(MainActivity.readText(context,vertexShaderResourceId),MainActivity.readText(context,fragmentShaderResourceId));
    }

    public void userProgram(){
        GLES20.glUseProgram(program);
    }
}
































